package net.lanelife.casino.caipiao.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Table;

import net.lanelife.casino.common.entity.annotation.Checked;
import net.lanelife.casino.common.entity.support.CheckableEntity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

/**
 * @author Lane
 * 公司银行卡
 */
@Entity
@DynamicInsert
@DynamicUpdate
@Table(name = "TB_COMPANY_BANK_CARD")
public class CompanyBankCard extends CheckableEntity<Integer> {

	private static final long serialVersionUID = 7266995953324982808L;
	
	@Checked
	@Column(name = "BANK_NAME", length = 10, nullable = false)
	private String bankName;
	
	@Checked
	@Column(name = "BRANCH_NAME", length = 20, nullable = false)
	private String branchName;
	
	@Checked
	@Column(name = "ACCOUNT_NAME", length = 10, nullable = false)
	private String accountName;
	
	@Checked
	@Column(name = "ACCOUNT_NO", length = 20, nullable = false, unique = true)
	private String accountNo;
	
	@Checked
	@Column(name = "ACCOUNT_EMAIL", length = 20, nullable = false)
	private String accountEmail;
	
	@Checked
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "RECHARGE_ACCOUNT_TYPE", nullable = false)
	private RechargeAccountType rechargeAccountType;
	
	@Checked
	@Column(name = "CURRENT_BALANCE", nullable = false)
	private Double currentBalance;
	
	@Checked
	@Column(name = "WARNING_AMOUNT", nullable = false)
	private Double warningAmount;
	
	@Checked
	@Enumerated(EnumType.ORDINAL)
	@Column(name = "USES_TYPE", nullable = false)
	private UsesType usesType;
	
	@Checked
	@Column(name = "AVAILABLE", nullable = false)
	private Boolean available = Boolean.TRUE;
	
	public static enum RechargeAccountType {
		NO, EMAIL
	}
	
	public static enum UsesType {
		CK, SK, ZZ
	}

	public String getBankName() {
		return bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getBranchName() {
		return branchName;
	}

	public void setBranchName(String branchName) {
		this.branchName = branchName;
	}

	public String getAccountName() {
		return accountName;
	}

	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}

	public String getAccountNo() {
		return accountNo;
	}

	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}

	public String getAccountEmail() {
		return accountEmail;
	}

	public void setAccountEmail(String accountEmail) {
		this.accountEmail = accountEmail;
	}

	public RechargeAccountType getRechargeAccountType() {
		return rechargeAccountType;
	}

	public void setRechargeAccountType(RechargeAccountType rechargeAccountType) {
		this.rechargeAccountType = rechargeAccountType;
	}

	public Double getCurrentBalance() {
		return currentBalance;
	}

	public void setCurrentBalance(Double currentBalance) {
		this.currentBalance = currentBalance;
	}

	public Double getWarningAmount() {
		return warningAmount;
	}

	public void setWarningAmount(Double warningAmount) {
		this.warningAmount = warningAmount;
	}

	public UsesType getUsesType() {
		return usesType;
	}

	public void setUsesType(UsesType usesType) {
		this.usesType = usesType;
	}

	public Boolean getAvailable() {
		return available;
	}

	public void setAvailable(Boolean available) {
		this.available = available;
	}
	
}
